import Dl from '@/views/dl.vue'
import Fl from '@/views/fl.vue'
import Gu from '@/views/gu.vue'
import Index from '@/views/index.vue'
import Me from '@/views/me.vue'
import Ss from '@/views/ss.vue'
import Sy from '@/views/sy.vue'
import Xq from '@/views/xq.vue'
import Zc from '@/views/zc.vue'
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '',
      redirect:'/zc'
    },
    {
      path: '/zc',
      component: Zc,
    },
    {
      path: '/dl',
      component: Dl,
    },
    {
      path: '/ss',
      component: Ss,
    },
    {
      path: '/xq/:goods_id',
      component: Xq,
    },

    {
      path: '/index',
      component: Index,
      children: [
        {
          path: 'sy',
          component: Sy,
        },
        {
          path: 'gu',
          component: Gu,
        },
        {
          path: 'fl',
          component: Fl,
        },
        {
          path: 'me',
          component: Me,
        },
      ]
    },
  ],
})

export default router
